package com.book.common;

public enum OrderPayTypeEnum {
    ORDER_PAY_TYPE_SELF(1, "上门自提"),
    ORDER_PAY_TYPE_WAIT(2, "送货上门");

    private Integer code;
    private String msg;

    OrderPayTypeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMsg(Integer code) {
        OrderPayTypeEnum[] payTypeEnums = values();
        for (OrderPayTypeEnum p : payTypeEnums
        ) {
            if (p.code.equals(code)) {
                return p.msg;
            }
        }
        return null;
    }

}
